<?php

class Element
{
  static protected $dict = array(
    '1' => '金',
    '2' => '木',
    '3' => '水',
    '4' => '火',
    '5' => '土'
  );

  static public function getNameById($id)
  {
    if (!isset(self::$dict[$id])) {
      throw new sfException('no id: '.$id);
    }
    return self::$dict[$id];
  }
}
